//
//  UIView+IBExtention.swift
//  新浪 weibo
//
//  Created by xuwei on 16/1/20.
//  Copyright © 2016年 xuwei. All rights reserved.
//

import UIKit

extension UIView{
    @IBInspectable var borderWidth: CGFloat{
        set{
            layer.borderWidth = newValue
        }
        get{
            return layer.borderWidth
        }
    }
    
    @IBInspectable var borderColor: UIColor?{
        set{
            layer.borderColor = newValue?.CGColor
        }
        get{
            if layer.borderColor != nil{
                return UIColor(CGColor: layer.borderColor!)
            }
            return nil
        }
    }
    
    @IBInspectable var cornerRadius: CGFloat{
        set{
            layer.cornerRadius = newValue
            layer.masksToBounds = newValue>0
        }
        get{
            return layer.cornerRadius
        }
    }
    
    
    
    
}